package com.yh.ssm.common;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName: Result.java
 * @author: yuhui
 * @version: 1.0.0
 * @Description: TODO
 * @createTime: 2021年04月29日 09:42:00
 */
/*web响应结果封装*/
@Data
public class Result {
    public Integer code;
    public String msg;
    public Object data;

    public Result(){
        this.code = CodeMsg.SUCCESS.code;
        this.msg = CodeMsg.SUCCESS.msg;
    }
    public Result(Object data){
        this();
        this.data = data;
    }
    public Result(CodeMsg codeMsg){
        this.code = codeMsg.code;
        this.msg = codeMsg.msg;
    }
}
